<div class="modal-content" ng-controller="newRedCtrl">

    </br>
    <div class="modal-header">
        <button type="button" class="close" ng-click="myopen.opt_close()" aria-label="Close">
      <em class="ion-ios-close-empty sn-link-close"></em>
    </button>
        <h3 class="modal-title text-center">
            <samll>新增红包活动</samll>
        </h3>
    </div>
    <form class="form-horizontal ng-pristine ng-valid ng-scope">
        <div class="form-group">
            <label for="inputEmail3" class="col-sm-2 control-label">*活动名称：</label>
            <div class="col-sm-9">
                <input type="text" class="form-control" id="inputEmail3" placeholder="活动名称" maxlength="150" ng-model="red_data.name">

            </div>
        </div>
        <div class="row">&nbsp;</div>
        <div class="form-group">
            <label for="inputEmail3" class="col-sm-2 control-label">*活动持续时间：</label>
            <div class="col-sm-4">
                <input type="datetime-local" class="form-control border-r5" id="inputEmail3" value="{{dat.dat1.date_}}" ng-model="dat.dat1.date_">
            </div>
            <div class="col-sm-4 col-sm-offset-1">
                <input type="datetime-local" class="form-control border-r5" id="inputEmail3" value="{{dat.dat2.date_}}" ng-model="dat.dat2.date_">
            </div>
        </div>
        <div class="form-group">
            <label for="inputEmail3" class="col-sm-2 control-label">*总金额：</label>
            <div class="col-sm-4">
                <input type="text" class="form-control" id="inputEmail3" placeholder="红包总金额（元）" ng-model="red_data.amount">
            </div>
            <label style="padding: 0;" for="inputEmail3" class="col-sm-1 control-label" *>总个数：</label>
            <div class="col-sm-4">
                <input type="text" class="form-control" id="inputEmail3" placeholder="红包总个数" ng-model="red_data.number">
            </div>
        </div>
        <!-- 活动描述 -->
        <div class="form-group">
            <label for="inputEmail3" class="col-sm-2 control-label">*活动描述：</label>
            <div class="col-sm-9">
                <input type="text" class="form-control" id="inputEmail3" placeholder="活动描述" maxlength="500" ng-model="red_data.description">
            </div>
        </div>
        <!-- 活动规则 -->
        <!--<div class="form-group">
            <label for="inputEmail3" class="col-sm-2 control-label">*活动规则：</label>
            <div class="col-sm-9">
                <textarea placeholder="活动规则" class="form-control" id="textarea01" maxlength="2000">1.同一用户仅可获得奖励一次。
2.活动时间：11月8日-12月31日。
                </textarea>
            </div>
        </div>-->
        <!-- 条件限制 -->
        <h3 class="modal-title text-center">
            <samll>红包匹配用户限制条件设置</samll>
        </h3>
        <div class="row">&nbsp;</div>
        <div class="form-group">
            <label for="inputEmail3" class="col-sm-2 control-label">出生日期：</label>
            <div class="col-sm-4">
                <input type="date" class="form-control border-r5" id="inputEmail3" ng-model="dat.dat3.date_">
            </div>
            <div class="col-sm-4 col-sm-offset-1">
                <input type="date" class="form-control border-r5" id="inputEmail3" ng-model="dat.dat4.date_">
            </div>
        </div>
        <div class="form-group">
            <label for="inputEmail3" class="col-sm-2 control-label">性别：</label>
            <div class="col-sm-4">
                <div class="col-sm-4"><label class="radio-inline custom-radio nowrap"><input type="radio" name="inlineRadioOptions" id="inlineRadio1" value="不限" ng-checked="red_data.sex==3" ng-click="red_data.sex='3'"> <span>不限</span></label></div>
                <div class="col-sm-4"><label class="radio-inline custom-radio nowrap"><input type="radio" name="inlineRadioOptions" id="inlineRadio3" value="男"  ng-checked="red_data.sex==0" ng-click="red_data.sex='0'"> <span>男</span></label></div>
                <div class="col-sm-4"><label class="radio-inline custom-radio nowrap"><input type="radio" name="inlineRadioOptions" id="inlineRadio4" value="女"  ng-checked="red_data.sex==1" ng-click="red_data.sex='1'"> <span>女</span></label></div>
            </div>
            <label for="inputEmail3" class="col-sm-1 control-label">区域：</label>
            <div class="col-sm-4">
                <div class="col-sm-3" style="padding: 2px;">
                    <select style="padding: 2px;" class="form-control" ng-model="selectedProvince" ng-options="item[0] as item[1] for item in regionData1">  
                        <option value="">省</option>  
  	                </select>
                </div>
                <div class="col-sm-3" style="padding: 2px;">
                    <select style="padding: 2px;" class="form-control" ng-model="selectedCity" ng-options="item[0] as item[1] for item in regionData2">  
                        <option value="">市</option>  
                    </select>
                </div>
                <div class="col-sm-3" style="padding: 2px;">
                    <select style="padding: 2px;" class="form-control" ng-model="selectedDstrict" ng-options="item[0] as item[1] for item in regionData3">  
                        <option value="">区</option>  
                    </select>
                </div>
                <div class="col-sm-1">
                    <span style="top: 7px;   width: 55px;" class="btn btn-info editable-table-button btn-xs  col-sm-4" ng-click="add_region()">添加</span>
                </div>
            </div>
        </div>
        <div class="form-group" ng-if="is_region_data">
            <label for="inputEmail3" class="col-sm-2 control-label">选中的区域：</label>
            <div class="col-sm-9">
                <div class="bootstrap-tagsinput">
                    <span style="display: inline-block;" class="tag label label-primary" ng-repeat="region in region_data">{{region}}<span data-role="remove" ng-click="region_deleta($index)"></span></span>
                </div>
            </div>
        </div>

        <!-- 红包图片 -->
        <div class="form-group">
            <label for="inputEmail3" class="col-sm-2 control-label">红包活动宣传图：</label>
            <div class="col-sm-9">
                <img ng-if="red_data.posters" ng-src="{{red_data.posters}}" alt="" style="max-width: 600px;">
                <div class="row">
                    <div class=" col-sm-2 iscursor" ng-file-select1="onFileSelect($files)" onclick="this.value = null" ng-click="context_img_fn (1)" data-multiple="true">
                        <span ng-if="!red_data.posters" class="glyphicon glyphicon-plus" style="font-size: 35px;margin-left: 50px;" aria-hidden="true"></span>
                        <span ng-if="red_data.posters" style="margin: 15px;" class="btn btn-primary  btn-xs">替换</span>
                    </div>
                    <span ng-if="red_data.posters" style="margin: 15px;" class="btn btn-danger  btn-xs" ng-click="img_delete(1)">删除</span>
                </div>
            </div>
            <div class="col-sm-6 col-sm-offset-2" ng-if="mystyle.posters.width!='0%'">
                <div class="progress ng-scope" ng-if="mystyle.posters.width!='100%'">
                    <div class="progress-bar progress-bar-info" role="progressbar" aria-valuenow="20" aria-valuemin="0" aria-valuemax="100" ng-style="mystyle.posters">{{mystyle.posters.width}} 已完成</div>
                </div>
            </div>
        </div>
        <div class="form-group">
            <label for="inputEmail3" class="col-sm-2 control-label">红包活动主图：</label>
            <div class="col-sm-9">
                <img ng-if="red_data.mainpic" ng-src="{{red_data.mainpic}}" alt="" style="    max-width: 600px;">
                <div class="row">
                    <div class="col-sm-2 iscursor" ng-file-select1="onFileSelect($files)" onclick="this.value = null" ng-click="context_img_fn (2)" data-multiple="true">
                        <span ng-if="!red_data.mainpic" class="glyphicon glyphicon-plus " style="font-size: 35px;margin-left: 50px;" aria-hidden="true"></span>
                        <span ng-if="red_data.mainpic" style="margin: 15px;" class="btn btn-primary  btn-xs">替换</span>
                    </div>
                    <span ng-if="red_data.mainpic" style="margin: 15px;" class="btn btn-danger  btn-xs" ng-click="img_delete(2)">删除</span>
                </div>
            </div>
            <div class="col-sm-6 col-sm-offset-2" ng-if="mystyle.mainpic.width!='0%'">
                <div class="progress ng-scope" ng-if="mystyle.mainpic.width!='100%'">
                    <div class="progress-bar progress-bar-info" role="progressbar" aria-valuenow="20" aria-valuemin="0" aria-valuemax="100" ng-style="mystyle.mainpic">{{mystyle.mainpic.width}} 已完成</div>
                </div>
            </div>
        </div>
        <!--<div class="form-group">
            <label for="inputEmail3" class="col-sm-2 control-label">红包中奖提示图：</label>
            <div class="col-sm-9">
                <img src="//img.hb.aicdn.com/5abf072f486e6d8a79fb2200c9b2bd2ca444f7095079-YJqj2m_fw658" alt="">
                <div class="row">
                    <button style="margin: 15px;" class="btn btn-primary editable-table-button btn-xs  col-sm-4">替换</button>
                    <button style="margin: 15px;" class="btn btn-danger editable-table-button btn-xs  col-sm-4">删除</button>
                </div>
            </div>
        </div>-->

    </form>
    <div class="row">
        <div class="button-wrapper ng-scope">
            <span class="btn btn-default btn-raised" ng-click="myopen.opt_close()">取消</span>
            <span class="btn btn-info btn-raised" ng-click="Submit()">保存</span>
        </div>
    </div>
    </br>
</div>